package com.scott.crm.holiday.dao;

import com.scott.crm.holiday.bean.HolidayBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.BaseMapper;

import java.util.List;

/**
 * @author 王伟雄
 * @create 2021/11/30 14:34
 */
@Mapper
public interface HolidayDao extends BaseMapper<HolidayBean> {

    List<HolidayBean> findByStudent(Integer id);

    List<HolidayBean> findByStudentLimit(@Param(value = "begin") Integer begin,@Param(value = "end") Integer end,@Param(value = "id") Integer id);

    List<HolidayBean> findByTeacher(@Param("holidayBean") HolidayBean holidayBean);

    List<HolidayBean> findByTeacherLimit(@Param(value = "begin") Integer begin,@Param(value = "end") Integer end,@Param("holidayBean") HolidayBean holidayBean);

    Integer updateByTeacher(@Param("ids") List<Integer> ids,@Param("flag") Integer flag);
}
